package cn.dnuihyy406.dnuifood_16110100406.model;

import cn.dnuihyy406.dnuifood_16110100406.iface.SearchIface;
import cn.dnuihyy406.dnuifood_16110100406.listener.OnRetrofitListener;
import cn.dnuihyy406.dnuifood_16110100406.service.SearchService;
import retrofit2.Call;

public class SearchModel extends BaseModel implements SearchIface{
    private SearchService searchService;
    public SearchModel(){
        super();
        searchService=retrofit.create(SearchService.class);
    }
    @Override
    public void getFoodBySearch(String search, OnRetrofitListener listener) {
        Call call=searchService.getFoodBySearch(search);
        bindCallBack(call,listener,10);
    }
}